#ifndef GROUPDETAILDIALOG_H
#define GROUPDETAILDIALOG_H

#include <QDialog>
#include <QStandardItemModel>

#include "data_bean.h"
#include "dashboard.h"

namespace Ui {
class GroupDetailDialog;
}

class GroupDetailDialog : public QDialog
{
    Q_OBJECT

public:
    explicit GroupDetailDialog(Group& group, Dashboard* p, QWidget *parent = 0);
    ~GroupDetailDialog();

    bool add_member(const QString& member);

private slots:
    void on_btn_ok_clicked();

    void on_btn_add_member_clicked();

private:
    Ui::GroupDetailDialog *ui;
    Group group;
    Dashboard* parent;
    QStandardItemModel* member_model = NULL;

    void init();
    void update_lst_view();
};

#endif // GROUPDETAILDIALOG_H
